<?php
	// ----------------------------------------------------
	// Beschreibung Skript:
	//   Gibt den aktuellen Benutzer aus und speichert
	//   Änderungen an diesem Benutzer.
	//
	// ----------------------------------------------------
	// Änderungen:
	//
	// ----------------------------------------------------
	
	
	// ------------------------------------------------------
	// Initialisiert das Skript.
	// ------------------------------------------------------
	require_once 'loader.php';
	
	$Settings->getSettingsData();
	if(isset($_POST['isSuperUser'])) {
		$isSuperUser = htmlspecialchars($_POST['isSuperUser']);
	}
	
	// ------------------------------------------------------
	// Header laden.
	// ------------------------------------------------------
	$Header->printHeader();
	
	// ------------------------------------------------------
	// Settings laden.
	// ------------------------------------------------------
	// Print settings.
	$arrLabel = Array('InitialMemberAmount', 'MaxShareAssociationFee', 'FamilyDiscount', 'CommitteeAmount', 'OnceFAASAmountAdult', 'OnceFAASAmountChild');
	$arrValue = Array($Settings->InitialMemberAmount, $Settings->MaxShareAssociationFee,
			$Settings->FamilyDiscount, $Settings->CommitteeAmount,
			$Settings->OnceFAASAmountAdult, $Settings->OnceFAASAmountChild);
	If ($isSuperUser) {
		array_push($arrLabel, 'Debug');
		array_push($arrValue, $Settings->Debug);
	}
	//
	print('<form Action="get_settings.php" method="post">'."\n");
	print('<table>'."\n");
	print('  <tbody>'."\n");
	For ($ix = 0; $ix < count($arrLabel); $ix++) {
		print('    <tr>'."\n");
		print('      <td>'.$arrLabel[$ix].':</td>'."\n");
		print('      <td><input name="'.$arrLabel[$ix].'" type="text" size="20" maxlength="20" value="'.$arrValue[$ix].'" /></td>'."\n");
		print('    </tr>'."\n");
	}
	print('    <tr>'."\n");
	print('      <td>&nbsp;</td><td align="right">'."\n");
	print('      	<input type="button" value="Abbrechen" onclick="location.href = \'get_settings.php\'">'."\n");
	print('      	<span style="width:10pt;">&nbsp;</span>'."\n");
	print('      	<input type="submit" value="Senden">'."\n");
	print('      </td>'."\n");
	print('    </tr>'."\n");
	print('  </tbody>'."\n");
	print('</table>'."\n");
	print('</form>'."\n");
	print("<br />"."\n");
		//
	